@workday/canvas-kit-labs-react
Version:
Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functi
11 lines (10 loc) • 641 B
JavaScript
import React from 'react';
import { createComponent } from '@workday/canvas-kit-react/common';
import { Box } from '@workday/canvas-kit-react/layout';
import { colors, space, type } from '@workday/canvas-kit-react/tokens';
export const ExpandableTitle = createComponent('div')({
displayName: 'Expandable.Title',
Component: ({ children, ...elemProps }, ref, Element) => {
return (React.createElement(Box, { as: Element, ref: ref, ...type.levels.body.medium, fontWeight: type.properties.fontWeights.bold, color: colors.blackPepper400, padding: `2px ${space.zero} 2px`, textAlign: "left", ...elemProps }, children));
},
});