Skip to content

Commit

Permalink
update: made progress bar thinner
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-karger committed Jul 31, 2024
1 parent 23d8130 commit 02f6136
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-turtles-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"solidui-cli": patch
---

update: switch progress style to be more in line with the rest
2 changes: 1 addition & 1 deletion apps/docs/public/registry/ui/progress.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"files": [
{
"name": "progress.tsx",
"content": "import type { Component, JSX, ValidComponent } from \"solid-js\"\nimport { splitProps } from \"solid-js\"\n\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport * as ProgressPrimitive from \"@kobalte/core/progress\"\n\nimport { Label } from \"~/registry/ui/label\"\n\ntype ProgressRootProps<T extends ValidComponent = \"div\"> =\n ProgressPrimitive.ProgressRootProps<T> & { children?: JSX.Element }\n\nconst Progress = <T extends ValidComponent = \"div\">(\n props: PolymorphicProps<T, ProgressRootProps<T>>\n) => {\n const [local, others] = splitProps(props as ProgressRootProps, [\"children\"])\n return (\n <ProgressPrimitive.Root {...others}>\n {local.children}\n <ProgressPrimitive.Track class=\"relative h-4 w-full overflow-hidden rounded-full bg-secondary\">\n <ProgressPrimitive.Fill class=\"h-full w-[var(--kb-progress-fill-width)] flex-1 bg-primary transition-all\" />\n </ProgressPrimitive.Track>\n </ProgressPrimitive.Root>\n )\n}\n\nconst ProgressLabel: Component<ProgressPrimitive.ProgressLabelProps> = (props) => {\n return <ProgressPrimitive.Label as={Label} {...props} />\n}\n\nconst ProgressValueLabel: Component<ProgressPrimitive.ProgressValueLabelProps> = (props) => {\n return <ProgressPrimitive.ValueLabel as={Label} {...props} />\n}\n\nexport { Progress, ProgressLabel, ProgressValueLabel }\n"
"content": "import type { Component, JSX, ValidComponent } from \"solid-js\"\nimport { splitProps } from \"solid-js\"\n\nimport type { PolymorphicProps } from \"@kobalte/core/polymorphic\"\nimport * as ProgressPrimitive from \"@kobalte/core/progress\"\n\nimport { Label } from \"~/registry/ui/label\"\n\ntype ProgressRootProps<T extends ValidComponent = \"div\"> =\n ProgressPrimitive.ProgressRootProps<T> & { children?: JSX.Element }\n\nconst Progress = <T extends ValidComponent = \"div\">(\n props: PolymorphicProps<T, ProgressRootProps<T>>\n) => {\n const [local, others] = splitProps(props as ProgressRootProps, [\"children\"])\n return (\n <ProgressPrimitive.Root {...others}>\n {local.children}\n <ProgressPrimitive.Track class=\"relative h-2 w-full overflow-hidden rounded-full bg-secondary\">\n <ProgressPrimitive.Fill class=\"h-full w-[var(--kb-progress-fill-width)] flex-1 bg-primary transition-all\" />\n </ProgressPrimitive.Track>\n </ProgressPrimitive.Root>\n )\n}\n\nconst ProgressLabel: Component<ProgressPrimitive.ProgressLabelProps> = (props) => {\n return <ProgressPrimitive.Label as={Label} {...props} />\n}\n\nconst ProgressValueLabel: Component<ProgressPrimitive.ProgressValueLabelProps> = (props) => {\n return <ProgressPrimitive.ValueLabel as={Label} {...props} />\n}\n\nexport { Progress, ProgressLabel, ProgressValueLabel }\n"
}
],
"type": "ui"
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/registry/ui/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Progress = <T extends ValidComponent = "div">(
return (
<ProgressPrimitive.Root {...others}>
{local.children}
<ProgressPrimitive.Track class="relative h-4 w-full overflow-hidden rounded-full bg-secondary">
<ProgressPrimitive.Track class="relative h-2 w-full overflow-hidden rounded-full bg-secondary">
<ProgressPrimitive.Fill class="h-full w-[var(--kb-progress-fill-width)] flex-1 bg-primary transition-all" />
</ProgressPrimitive.Track>
</ProgressPrimitive.Root>
Expand Down

0 comments on commit 02f6136

Please sign in to comment.