Skip to content

Commit 0e0db5d

Browse files
committed
FEAT: Add new classes to hero component
1 parent 195fae1 commit 0e0db5d

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

docs/pycui/components/hero.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PYCHero
2+
The hero component provides a brief overview of the site contents. It also prompts the user to perform a certain action
3+
to "get them started".
4+
5+
## Usage
6+
### HTML
7+
```html
8+
<section class="pyc-hero">
9+
<div class="pyc-hero__wrap">
10+
<img class="pyc-hero__img" src="#" alt="Image" />
11+
<h1 class="pyc-hero__title">Hero Title</h1>
12+
<span class="pyc-hero__subtitle">Hero subtitle</span>
13+
<div class="pyc-hero__actions">
14+
<a href="#" class="pyc-button is-filled">
15+
<span class="pyc-button__label">Get Started!</span>
16+
</a>
17+
</div>
18+
</div>
19+
</section>
20+
```
21+
22+
### SCSS
23+
```scss
24+
@use 'node_modules/@pycord/pycui';
25+
@use 'node_modules/@pycord/pycui/pyc-hero';
26+
27+
@include pycui.init {
28+
@include pyc-hero.render();
29+
}
30+
```
31+
32+
## API
33+
### CSS Classes
34+
#### Anatomical Classes
35+
| Class Name | Description |
36+
|----------------------|---------------------------------|
37+
| `pyc-hero` | The main hero class. |
38+
| `pyc-hero__wrap` | The hero content wrapper class. |
39+
| `pyc-hero__img` | The hero image class. |
40+
| `pyc-hero__title` | The hero title class. |
41+
| `pyc-hero__subtitle` | The hero subtitle class. |
42+
| `pyc-hero__actions` | The hero actions section class. |

packages/pycui/pyc-hero/_hero-styles.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
max-width: 1077px;
4040
margin: 0 auto;
4141

42-
img {
42+
.pyc-hero__img {
4343
width: 100px;
4444
height: auto;
4545
margin-bottom: 0.7rem;
4646
user-select: none;
4747
}
4848

49-
h1 {
49+
.pyc-hero__title {
5050
text-align: center;
5151
font-size: clamp(#{pyc-core.to-rem(28px)}, 10vw, #{pyc-core.to-rem(34px)});
5252
}

0 commit comments

Comments
 (0)