diff --git a/src/sections/Projects/Sistent/components/select/code.js b/src/sections/Projects/Sistent/components/select/code.js new file mode 100644 index 000000000000..2fe492150816 --- /dev/null +++ b/src/sections/Projects/Sistent/components/select/code.js @@ -0,0 +1,277 @@ +import React from "react"; + +import { Button, SistentThemeProvider } from "@layer5/sistent"; +import { CodeBlock } from "./code-block"; +import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight"; +import { SistentLayout } from "../../sistent-layout"; + +import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; +import SectionNav from "./section-nav"; +import Header from "./header"; +import { FormControl, InputLabel, MenuItem, Select } from "@mui/material"; + +const codes = { + "variant-outlined": ` + +`, + + "variant-filled": ` + +`, + + "variant-standard": ` + +`, + + "size-auto": ` + +`, + + "size-small": ` + +`, + + "size-fullwidth": ` + +`, + + "behavior-error-disabled": ` + + +`, + + "behavior-required": ` + + Age + + +`, +}; + +const ButtonCode = () => { + const { isDark } = useStyledDarkMode(); + + return ( + +
+
+ + +
+ +

Select variants

+
+

+ The select comes in three types: Outlined, Filled, and Standard. To + specify the variant, pass a value to the variant prop. +

+

Outlined

+

+ If not specified, the default variant of the select if outlined. +

+
+
+ + + +
+ +
+

Filled

+
+
+ + + +
+ +
+

Standard

+
+
+ + + +
+ +
+ +

Sizes

+
+

+ There are 3 size option for the select component: autowidth, small, + and fullWidth. Depending on the size of the select, different prop + can be passed to the component. +

+

Autowidth

+

+ An autoWidth option is passed to the component to enable this + attribute +

+
+
+ + + +
+ +
+

Small

+

+ To generate small select, pass a size prop with a value of small +

+
+
+ + + +
+ +
+

Full width

+

+ The select will expand the full width of its parent when passed + fullWidth prop +

+
+
+ + + +
+ +
+ +

Customize behaviors

+
+

+ Additional props such as error, required, and disabled can be passed + to the select component to customize its behavior. +

+
+
+ + + + +
+ +
+
+
+ + + Age + + + +
+ +

+ NOTE: +

+

+ When the select component is marked as required, an asterisk is + added to the label to indicate this to the user. It is recommended + to use this feature in conjunction with the label for better + clarity. +

+
+ +

Customize select area

+
+
+
+
+ ); +}; + +export default ButtonCode;