How to use the @wordpress/compose.withPreferredColorScheme function in @wordpress/compose

To help you get started, we’ve selected a few @wordpress/compose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WordPress / gutenberg / packages / block-library / src / gallery / gallery-image.native.js View on Github external
);
	}

	accessibilityLabelImageContainer() {
		const { caption, 'aria-label': ariaLabel } = this.props;

		return isEmpty( caption ) ? ariaLabel : ( ariaLabel + '. ' + sprintf(
			/* translators: accessibility text. %s: image caption. */
			__( 'Image caption. %s' ), caption
		) );
	}
}

export default withPreferredColorScheme( GalleryImage );
github WordPress / gutenberg / packages / components / src / mobile / bottom-sheet / missing-cell.native.js View on Github external
accessibilityHint={
				/* translators: accessibility text (hint for opening a bottom sheet with help message) */
				__( 'Double tap to show help' )
			}
		>
			
		
	);
}

export default withPreferredColorScheme( BottomSheetMissingCell );
github WordPress / gutenberg / packages / components / src / mobile / bottom-sheet / range-cell.native.js View on Github external
{ width: 40 * fontScale },
						] }
						onChangeText={ this.handleChange }
						onFocus={ this.handleToggleFocus }
						onBlur={ this.handleToggleFocus }
						keyboardType="number-pad"
						returnKeyType="done"
						value={ `${ sliderValue }` }
					/>
				
			
		);
	}
}

export default withPreferredColorScheme( BottomSheetRangeCell );
github WordPress / gutenberg / packages / block-editor / src / components / media-placeholder / index.native.js View on Github external
style={ [
									emptyStateContainerStyle,
									isAppender && styles.isAppender,
								] }>
								{ getMediaOptions() }
								{ renderContent() }
							
						
					);
				} }
			/>
		
	);
}

export default withPreferredColorScheme( MediaPlaceholder );
github WordPress / gutenberg / packages / block-editor / src / components / button-block-appender / index.native.js View on Github external
size={ addBlockButtonStyle.size }
							/>
						
					
				) }
				isAppender
				showSeparator={ showSeparator }
			/>
		
	);
}

/**
 * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/button-block-appender/README.md
 */
export default withPreferredColorScheme( ButtonBlockAppender );
github WordPress / gutenberg / packages / components / src / mobile / bottom-sheet / cell.native.js View on Github external
}
					
					{ showValue && getValueComponent() }
					{ children }
				
				{ ! drawTopSeparator && (
github WordPress / gutenberg / packages / components / src / mobile / bottom-sheet / cell.native.js View on Github external
{ showValue && getValueComponent() }
					{ children }
				
				{ ! drawTopSeparator && (
github WordPress / gutenberg / packages / components / src / button / index.native.js View on Github external
accessibilityHint={ hint }
			onPress={ onClick }
			style={ styles.container }
			disabled={ isDisabled }
		>
			
		
	);
}

export default withPreferredColorScheme( Button );
github WordPress / gutenberg / packages / components / src / mobile / notification-sheet / index.native.js View on Github external
onClose={ onClose }
		>
			
		
	);
}

export default withPreferredColorScheme( NotificationSheet );