@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
17 lines (16 loc) • 960 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { createStencil, handleCsProp } from '@workday/canvas-kit-styling';
import { createComponent } from '@workday/canvas-kit-react/common';
import { Subtext } from '@workday/canvas-kit-react/text';
import { PaginationContext } from '../usePaginationModel';
export const paginationGoToLabelStencil = createStencil({
base: { name: "256628", styles: "box-sizing:border-box;white-space:nowrap;" }
}, "pagination-go-to-label-b25b17");
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", ...handleCsProp(elemProps, paginationGoToLabelStencil()), children: typeof children === 'function' ? children(model) : children }));
},
});