Skip to content

Commit 695c0fe

Browse files
committed
feat(styled kit): add Separator component
1 parent b803f55 commit 695c0fe

File tree

12 files changed

+131
-3
lines changed

12 files changed

+131
-3
lines changed

.changeset/pretty-vans-march.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik-ui/styled': patch
3+
---
4+
5+
feat(styled kit): add Separator component

apps/website/src/_state/component-statuses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const statusByComponent: ComponentKitsStatuses = {
2424
Popover: ComponentStatus.Draft,
2525
Separator: ComponentStatus.Beta,
2626
Tabs: ComponentStatus.Beta,
27+
Textarea: ComponentStatus.Draft,
2728
},
2829
headless: {
2930
Accordion: ComponentStatus.Beta,

apps/website/src/global.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,15 +1220,16 @@
12201220
background-color: var(--qwikui-slate-500);
12211221
border-radius: 0.5rem;
12221222
background-clip: padding-box;
1223-
border: 0.3rem solid transparent;
1223+
border-left: 0.3rem solid transparent;
1224+
border-right: 0.3rem solid transparent;
12241225
}
12251226

12261227
*::-webkit-scrollbar-corner {
12271228
background: transparent;
12281229
}
12291230

12301231
*::-webkit-scrollbar-track {
1231-
background: #f1f1f1;
1232+
background: transparent;
12321233
border-left: 1px solid var(--qwikui-slate-300);
12331234
}
12341235

@@ -1239,11 +1240,12 @@
12391240
.dark *::-webkit-scrollbar-track {
12401241
background: transparent;
12411242
border-left: 1px solid var(--qwikui-slate-800);
1243+
border-right: 1px solid var(--qwikui-slate-800);
12421244
}
12431245

12441246
.code-example *::-webkit-scrollbar-track {
12451247
background: transparent;
1246-
border-left: 0px;
1248+
border: 0px;
12471249
}
12481250

12491251
.code-example *::-webkit-scrollbar-thumb {

apps/website/src/routes/docs/styled/menu.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
- [Popover](/docs/styled/popover)
2121
- [Separator](/docs/styled/separator)
2222
- [Tabs](/docs/styled/tabs)
23+
- [Textarea](/docs/styled/textarea)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Textarea } from '@qwik-ui/styled';
3+
4+
export default component$(() => {
5+
return <Textarea placeholder="Type your message here." disabled />;
6+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Textarea } from '@qwik-ui/styled';
3+
4+
export default component$(() => {
5+
return <Textarea placeholder="Type your message here." />;
6+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Button, Textarea } from '@qwik-ui/styled';
3+
4+
export default component$(() => {
5+
return (
6+
<div class="grid w-full gap-2">
7+
<Textarea placeholder="Type your message here." />
8+
<Button>Send message</Button>
9+
</div>
10+
);
11+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Label, Textarea } from '@qwik-ui/styled';
3+
4+
export default component$(() => {
5+
return (
6+
<div class="grid w-full gap-1.5">
7+
<Label for="message">Your message</Label>
8+
<Textarea placeholder="Type your message here." id="message" />
9+
</div>
10+
);
11+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Label, Textarea } from '@qwik-ui/styled';
3+
4+
export default component$(() => {
5+
return (
6+
<div class="grid w-full gap-1.5">
7+
<Label for="message-2">Your Message</Label>
8+
<Textarea placeholder="Type your message here." id="message-2" />
9+
<p class="text-muted-foreground text-sm">
10+
Your message will be copied to the support team.
11+
</p>
12+
</div>
13+
);
14+
});
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Qwik UI | Styled Textarea Component
3+
---
4+
5+
import { statusByComponent } from '~/_state/component-statuses';
6+
7+
<StatusBanner status={statusByComponent.styled.Textarea} />
8+
9+
# Textarea
10+
11+
Displays a form textarea field or a component that looks like a textarea.
12+
13+
<Showcase name="hero" />
14+
15+
## Installation
16+
17+
```sh
18+
qwik-ui add textarea
19+
```
20+
21+
## Usage
22+
23+
```tsx
24+
import { Textarea } from '@/components/ui/textarea';
25+
```
26+
27+
```tsx
28+
<Textarea />
29+
```
30+
31+
## Examples
32+
33+
### Disabled
34+
35+
<Showcase name="disabled" vertical />
36+
37+
### With Label
38+
39+
<Showcase name="with-label" vertical />
40+
41+
### With button
42+
43+
<Showcase name="with-button" vertical />
44+
45+
### With text
46+
47+
<Showcase name="with-text" vertical />

0 commit comments

Comments
 (0)