@cerberus-design/react
Version:
The Cerberus Design React component library.
67 lines (64 loc) • 1.61 kB
JavaScript
import { table } from 'styled-system/recipes';
import { createCerberusPrimitive, cerberus } from '../../system/index.js';
const { withSlotRecipe } = createCerberusPrimitive(table);
const TableRoot = withSlotRecipe(cerberus.div, "root", {
defaultProps: {
"data-scope": "table",
"data-part": "root"
}
});
const TableEl = withSlotRecipe(cerberus.table, "table", {
defaultProps: {
"data-scope": "table",
"data-part": "table"
}
});
const Caption = withSlotRecipe(cerberus.caption, "caption", {
defaultProps: {
"data-scope": "table",
"data-part": "caption"
}
});
const Thead = withSlotRecipe(cerberus.thead, "thead", {
defaultProps: {
"data-scope": "table",
"data-part": "header"
}
});
const Th = withSlotRecipe(cerberus.th, "th", {
defaultProps: {
"data-scope": "table",
"data-part": "header-col"
}
});
const Tbody = withSlotRecipe(cerberus.tbody, "tbody", {
defaultProps: {
"data-scope": "table",
"data-part": "body"
}
});
const Tr = withSlotRecipe(cerberus.tr, "tr", {
defaultProps: {
"data-scope": "table",
"data-part": "row"
}
});
const Td = withSlotRecipe(cerberus.td, "td", {
defaultProps: {
"data-scope": "table",
"data-part": "cell"
}
});
const Tfoot = withSlotRecipe(cerberus.tfoot, "tfoot", {
defaultProps: {
"data-scope": "table",
"data-part": "footer"
}
});
const TableTrigger = withSlotRecipe(cerberus.button, "trigger", {
defaultProps: {
"data-scope": "table",
"data-part": "trigger"
}
});
export { Caption, TableEl, TableRoot, TableTrigger, Tbody, Td, Tfoot, Th, Thead, Tr };