How to use the @wordpress/components.styled function in @wordpress/components

To help you get started, we’ve selected a few @wordpress/components 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-editor / src / components / block-breadcrumb / breadcrumb-button.js View on Github external
/**
 * WordPress dependencies
 */
import { StyledPrimitives, styled } from '@wordpress/components';

const Button = styled( StyledPrimitives.Button )`
&:hover {
	text-decoration: underline;
	cursor: pointer;
	color: ${ ( props ) => props.theme.colors.primary };
}
&:focus{
	outline: none;
	outline-offset: -2px;
	box-shadow: none;
}
`;

export default function BlockBreadcrumbButton( { children, ...props } ) {
	return
github WordPress / gutenberg / packages / block-editor / src / components / block-breadcrumb / block-breadcrumb-button.js View on Github external
/**
 * WordPress dependencies
 */
import { StyledPrimitives, styled } from '@wordpress/components';

const Button = styled( StyledPrimitives.Button )`
  &:hover {
    text-decoration: underline;
    cursor: pointer;
    color: ${ ( props ) => props.theme.colors.primary };
  }
  &:focus{
		outline: none;
		outline-offset: -2px;
		box-shadow: none;
	}
`;

export default function BlockBreadcrumbButton( { children, ...props } ) {
	return