@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
15 lines (14 loc) • 712 B
JavaScript
import * as React from 'react';
import { createSubcomponent, styled, } from '@workday/canvas-kit-react/common';
import { Box } from '@workday/canvas-kit-react/layout';
import { useBannerActionText, useBannerModel } from './hooks';
const StyledActionBarText = styled(Box.as('span'))({
textDecoration: 'underline',
});
export const BannerActionText = createSubcomponent('span')({
displayName: 'Banner.ActionTextText',
modelHook: useBannerModel,
elemPropsHook: useBannerActionText,
})(({ children = 'View All', ...elemProps }, Element, model) => {
return (React.createElement(StyledActionBarText, { as: Element, display: model.state.isSticky ? 'none' : 'inline', ...elemProps }, children));
});