UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

12 lines (11 loc) 642 B
import * as React from 'react'; import { Subtext } from '@workday/canvas-kit-react/text'; import { createComponent } from '@workday/canvas-kit-react/common'; import { PaginationContext } from '../usePaginationModel'; export const GoToLabel = createComponent('label')({ displayName: 'Pagination.GoToLabel', Component({ children, ...elemProps }, ref, Element) { const model = React.useContext(PaginationContext); return (React.createElement(Subtext, { ref: ref, as: Element, size: "medium", variant: "hint", whiteSpace: "nowrap", ...elemProps }, typeof children === 'function' ? children(model) : children)); }, });