1.1.0 • Published 11 months ago
@najwer23snacks/textbox v1.1.0
The TextBox component is a flexible and reusable React component designed to render various types of text elements, including headings (h1, h2, h3), paragraphs (p), and links (a). It allows for easy customization of text elements while maintaining consistent styling across the application
Install
yarn add @najwer23snacks/textbox --dev
npm install @najwer23snacks/textbox --save-dev
Example
import { TextBox } from "@najwer23snacks/textbox";
export const Example = () => {
return (
<TextBox tag={"h3"}>hello</TextBox>
);
}
CSS tokens
:root {
/* Fonts */
--n23snack-font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica,
Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
/* TextBox */
--n23snack-textbox-h1-font-color: black;
--n23snack-textbox-h2-font-color: black;
--n23snack-textbox-h3-font-color: black;
--n23snack-textbox-p-font-color: black;
--n23snack-textbox-a-font-color: orange;
--n23snack-textbox-a-font-color-hover: orangered;
}