feat(build): migrate from Prettier to Oxfmt for performant code formatting (#42434)

This commit is contained in:
Đỗ Trọng Hải
2026-08-04 00:27:05 +07:00
committed by GitHub
parent 10f7927603
commit e4ef84ca72
2328 changed files with 90728 additions and 32682 deletions

View File

@@ -33,62 +33,59 @@ The Badge component from Superset's UI library.
<StoryWithControls
component="Badge"
props={{
count: 5,
size: "default",
showZero: false,
overflowCount: 99
}}
count: 5,
size: 'default',
showZero: false,
overflowCount: 99,
}}
controls={[
{
name: "count",
label: "Count",
type: "number",
description: "Number to show in the badge."
},
{
name: "size",
label: "Size",
type: "select",
options: [
"default",
"small"
],
description: "Size of the badge."
},
{
name: "showZero",
label: "Show Zero",
type: "boolean",
description: "Whether to show badge when count is zero."
},
{
name: "overflowCount",
label: "Overflow Count",
type: "number",
description: "Max count to show. Shows count+ when exceeded (e.g., 99+)."
},
{
name: "color",
label: "Color",
type: "select",
options: [
"pink",
"red",
"yellow",
"orange",
"cyan",
"green",
"blue",
"purple",
"geekblue",
"magenta",
"volcano",
"gold",
"lime"
],
description: "Custom background color for the badge."
}
]}
{
name: 'count',
label: 'Count',
type: 'number',
description: 'Number to show in the badge.',
},
{
name: 'size',
label: 'Size',
type: 'select',
options: ['default', 'small'],
description: 'Size of the badge.',
},
{
name: 'showZero',
label: 'Show Zero',
type: 'boolean',
description: 'Whether to show badge when count is zero.',
},
{
name: 'overflowCount',
label: 'Overflow Count',
type: 'number',
description: 'Max count to show. Shows count+ when exceeded (e.g., 99+).',
},
{
name: 'color',
label: 'Color',
type: 'select',
options: [
'pink',
'red',
'yellow',
'orange',
'cyan',
'green',
'blue',
'purple',
'geekblue',
'magenta',
'volcano',
'gold',
'lime',
],
description: 'Custom background color for the badge.',
},
]}
/>
## Try It
@@ -97,13 +94,7 @@ Edit the code below to experiment with the component:
```tsx live
function Demo() {
return (
<Badge
count={5}
size="default"
overflowCount={99}
/>
);
return <Badge count={5} size="default" overflowCount={99} />;
}
```
@@ -139,12 +130,12 @@ function ColorGallery() {
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `count` | `number` | `5` | Number to show in the badge. |
| `size` | `string` | `"default"` | Size of the badge. |
| `showZero` | `boolean` | `false` | Whether to show badge when count is zero. |
| `overflowCount` | `number` | `99` | Max count to show. Shows count+ when exceeded (e.g., 99+). |
| Prop | Type | Default | Description |
| --------------- | --------- | ----------- | ---------------------------------------------------------- |
| `count` | `number` | `5` | Number to show in the badge. |
| `size` | `string` | `"default"` | Size of the badge. |
| `showZero` | `boolean` | `false` | Whether to show badge when count is zero. |
| `overflowCount` | `number` | `99` | Max count to show. Shows count+ when exceeded (e.g., 99+). |
## Import