feat(build): migrate from Prettier to Oxfmt for docs

Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
hainenber
2026-07-28 21:38:39 +07:00
parent af9729a861
commit 1bbc63099b
2163 changed files with 89307 additions and 32009 deletions

View File

@@ -33,58 +33,56 @@ Navigation menu component supporting horizontal, vertical, and inline modes. Bas
<StoryWithControls
component="Menu"
props={{
mode: "horizontal",
selectable: true,
items: [
{
label: "Dashboards",
key: "dashboards"
},
{
label: "Charts",
key: "charts"
},
{
label: "Datasets",
key: "datasets"
},
{
label: "SQL Lab",
key: "sqllab"
}
]
}}
controls={[
{
name: "mode",
label: "Mode",
type: "select",
options: [
"horizontal",
"vertical",
"inline"
mode: 'horizontal',
selectable: true,
items: [
{
label: 'Dashboards',
key: 'dashboards',
},
{
label: 'Charts',
key: 'charts',
},
{
label: 'Datasets',
key: 'datasets',
},
{
label: 'SQL Lab',
key: 'sqllab',
},
],
description: "Menu display mode: horizontal navbar, vertical sidebar, or inline collapsible."
},
{
name: "selectable",
label: "Selectable",
type: "boolean",
description: "Whether menu items can be selected."
},
{
name: "multiple",
label: "Multiple",
type: "boolean",
description: "Allow multiple items to be selected."
},
{
name: "inlineCollapsed",
label: "Inline Collapsed",
type: "boolean",
description: "Whether the inline menu is collapsed (only applies to inline mode)."
}
]}
}}
controls={[
{
name: 'mode',
label: 'Mode',
type: 'select',
options: ['horizontal', 'vertical', 'inline'],
description:
'Menu display mode: horizontal navbar, vertical sidebar, or inline collapsible.',
},
{
name: 'selectable',
label: 'Selectable',
type: 'boolean',
description: 'Whether menu items can be selected.',
},
{
name: 'multiple',
label: 'Multiple',
type: 'boolean',
description: 'Allow multiple items to be selected.',
},
{
name: 'inlineCollapsed',
label: 'Inline Collapsed',
type: 'boolean',
description:
'Whether the inline menu is collapsed (only applies to inline mode).',
},
]}
/>
## Try It
@@ -142,10 +140,38 @@ function MenuWithIcons() {
<Menu
mode="horizontal"
items={[
{ label: <><Icons.DashboardOutlined /> Dashboards</>, key: 'dashboards' },
{ label: <><Icons.LineChartOutlined /> Charts</>, key: 'charts' },
{ label: <><Icons.DatabaseOutlined /> Datasets</>, key: 'datasets' },
{ label: <><Icons.ConsoleSqlOutlined /> SQL Lab</>, key: 'sqllab' },
{
label: (
<>
<Icons.DashboardOutlined /> Dashboards
</>
),
key: 'dashboards',
},
{
label: (
<>
<Icons.LineChartOutlined /> Charts
</>
),
key: 'charts',
},
{
label: (
<>
<Icons.DatabaseOutlined /> Datasets
</>
),
key: 'datasets',
},
{
label: (
<>
<Icons.ConsoleSqlOutlined /> SQL Lab
</>
),
key: 'sqllab',
},
]}
/>
);
@@ -154,11 +180,11 @@ function MenuWithIcons() {
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `mode` | `string` | `"horizontal"` | Menu display mode: horizontal navbar, vertical sidebar, or inline collapsible. |
| `selectable` | `boolean` | `true` | Whether menu items can be selected. |
| `items` | `any` | `[{"label":"Dashboards","key":"dashboards"},{"label":"Charts","key":"charts"},{"label":"Datasets","key":"datasets"},{"label":"SQL Lab","key":"sqllab"}]` | - |
| Prop | Type | Default | Description |
| ------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `mode` | `string` | `"horizontal"` | Menu display mode: horizontal navbar, vertical sidebar, or inline collapsible. |
| `selectable` | `boolean` | `true` | Whether menu items can be selected. |
| `items` | `any` | `[{"label":"Dashboards","key":"dashboards"},{"label":"Charts","key":"charts"},{"label":"Datasets","key":"datasets"},{"label":"SQL Lab","key":"sqllab"}]` | - |
## Import