Skip to content

Commit

Permalink
fix: the pillar ui core mistakes and add utility classes
Browse files Browse the repository at this point in the history
- make a button a inline-flex
- fix the paper border typo
- add border and flex utilities classes
  • Loading branch information
HamzaAmar committed May 20, 2024
1 parent 9968163 commit 7682312
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/docs/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/pillar-core/src/core/button/_button.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.btn {
--flex: inline-flex;

height: fit-content;
border: 1px solid transparent;
font-weight: 500;
Expand Down
2 changes: 0 additions & 2 deletions packages/pillar-core/src/core/kbd/_kbd.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.kdb {
padding: 0.125em 0.25em;
/* background: var(--color-shared-8, var(--surface-1)); */
/* color: var(--color-shared-12, var(--surface-12)); */
border: 0.075em solid transparent;
border-bottom-width: 0.175em;
width: fit-content;
Expand Down
2 changes: 2 additions & 0 deletions packages/pillar-core/src/core/paper/paper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const paper = forwardRef((props, ref) => {
children,
style = {},
className,
border,
...rest
} = props

Expand All @@ -38,6 +39,7 @@ const paper = forwardRef((props, ref) => {
[`u_margin-${m}`]: !!m,
[`u_width-${width}`]: !!width,
[`u_${ratio}`]: !!ratio,
[`u_border`]: !!border,
[className!]: !!className,
})

Expand Down
5 changes: 1 addition & 4 deletions packages/pillar-core/src/core/paper/paper.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ export interface PaperProps {
shadow?: Shadow
width?: Width
height?: CSSProperties['height']
borderPosition?: 'left' | 'right' | 'top' | 'bottom' | 'block' | 'inline' | 'all'
borderStyle?: CSSProperties['borderStyle']
borderColor?: ColorShade
borderWidth?: CSSProperties['borderStyle']
border?: boolean
ratio?: Ratio
}
3 changes: 3 additions & 0 deletions packages/pillar-core/src/css/utilities/_border.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.u_border {
border: 1px solid var(--surface-6);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.u_center {
display: flex;
display: var(--flex, flex);
justify-content: center;
align-items: center;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/pillar-core/src/css/utilities/_index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
@import './_fonts.css';
@import './_text.css';
@import './_animation.css';
@import './_center.css';
@import './_flex.css';
@import './_shadow.css';
@import './_fontSize.css';
@import './_corner.css';
@import './_sizing.css';
@import './_variants.css';
@import './_border.css';

0 comments on commit 7682312

Please sign in to comment.