@wordpress/components
Version:
UI components for WordPress.
32 lines (31 loc) • 697 B
JavaScript
/**
* Internal dependencies
*/
import { useElevation } from './hook';
import { createComponent } from '../utils';
/**
* `Elevation` is a core component that renders shadow, using the library's shadow system.
*
* The shadow effect is generated using the `value` prop.
*
* @example
* ```jsx
* import { Elevation, Surface, Text, View } from `@wordpress/components/ui`;
*
* function Example() {
* return (
* <Surface>
* <Text>Code is Poetry</Text>
* <Elevation value={ 5 } />
* </Surface>
* );
* }
* ```
*/
const Elevation = createComponent({
as: 'div',
useHook: useElevation,
name: 'Elevation'
});
export default Elevation;
//# sourceMappingURL=component.js.map