Skip to content

Commit 5c69261

Browse files
committed
feat: generated component using cursor config
1 parent 4aa7023 commit 5c69261

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

.cursorrules

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ This is an Ember.js addon containing reusable UI components for Upfluence's desi
88
- Less for styling
99
- Storybook for component documentation
1010
- pnpm for package management
11-
- when generating components, they should be added in the o-s-s folder unless specified otherwise. You can also suggest a basic structure if you can
11+
- when generating components, they should be added in the o-s-s folder unless specified otherwise. You can also suggest a basic structure if you can make it out from context.
12+
- to test it, you could add it to the proper component in the dummy app, starting with `oss-components/tests/dummy/app/templates/application.hbs` . If you can make out a better position in the children components of this template, based on context, even better.
13+
- Avoid all comments, we don't need explanatory comments if the function name is well chosen & clear.
1214

1315
## Code Style Guidelines
1416
- Follow Ember.js conventions and best practices

app/styles/oss-components.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
@import 'atoms/information-section';
4141
@import 'atoms/input-container';
4242
@import 'atoms/input-group';
43+
@import 'atoms/label';
4344
@import 'atoms/tip';
4445
@import 'atoms/tooltip';
4546
@import 'atoms/attribute';

tests/dummy/app/templates/input.hbs

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
Input group
259259
</div>
260260
<div class="fx-row fx-gap-px-24 fx-xalign-start">
261-
<OSS::InputGroup @value={{this.inputValue}} @prefix="@" @placeholder="Username" @autocomplete="off"/>
261+
<OSS::InputGroup @value={{this.inputValue}} @prefix="@" @placeholder="Username" @autocomplete="off" />
262262
<OSS::InputGroup @value={{this.inputValue}} @suffix="@example.com" @placeholder="john.doe" />
263263
<OSS::InputGroup
264264
@value={{this.inputValue}}
@@ -471,6 +471,31 @@
471471
</div>
472472
</div>
473473

474+
<div
475+
class="fx-col fx-1 background-color-white border border-color-default border-radius-md padding-px-12 fx-gap-px-12"
476+
>
477+
<div class="font-size-md font-weight-semibold">Label</div>
478+
<div class="fx-col fx-gap-px-12">
479+
<div class="fx-col fx-gap-px-6">
480+
<OSS::Label @text="Basic Label" />
481+
<OSS::Label @text="Required Label" @required={{true}} />
482+
<OSS::Label @text="Disabled Label" @disabled={{true}} />
483+
<OSS::Label @text="Large Label" @size="lg" @weight="semibold" />
484+
</div>
485+
<div class="fx-col fx-gap-px-6">
486+
<OSS::Label @text="Email Address" @for="email-demo" @required={{true}} />
487+
<input id="email-demo" type="email" class="upf-input" placeholder="Enter your email" />
488+
</div>
489+
<div class="fx-col fx-gap-px-6">
490+
<OSS::Label @for="password-demo" @required={{true}}>
491+
Password
492+
<em>(must be at least 8 characters)</em>
493+
</OSS::Label>
494+
<input id="password-demo" type="password" class="upf-input" placeholder="Enter your password" />
495+
</div>
496+
</div>
497+
</div>
498+
474499
<div
475500
class="fx-col fx-1 background-color-white border border-color-default border-radius-md padding-px-12 fx-gap-px-12"
476501
>
@@ -557,4 +582,4 @@
557582
<:footer>
558583
<span>This is the side panel's footer.</span>
559584
</:footer>
560-
</OSS::SidePanel> --}}
585+
</OSS::SidePanel> --}}

0 commit comments

Comments
 (0)