@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
13 lines (12 loc) • 686 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
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 (_jsx(Subtext, { ref: ref, as: Element, size: "medium", variant: "hint", whiteSpace: "nowrap", ...elemProps, children: typeof children === 'function' ? children(model) : children }));
},
});