Skip to content

Commit

Permalink
Ladle doesnt recognize the base scss style (#208)
Browse files Browse the repository at this point in the history
* feat: Resolve Ladle error

Criei um provider de acordo com a documentação do ladle e importei o base.css nele

feat #149

* refactor: remove path alias and ajust proportion 1rem to 10px

Removi o path alias e ajustei a proporção do 1rem to 10px

re #149

* refactor: Remove alias import

re #149

---------

Co-authored-by: Andre Almeida <andre-silva78@hotmail.com>
  • Loading branch information
PiluVitu and aalmeida00 authored Nov 20, 2023
1 parent 8aeaed2 commit c12a7df
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .ladle/components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { GlobalProvider } from '@ladle/react';
import React from 'react';

import '../src/styles/base.scss';

export const Provider: GlobalProvider = ({ children }) => <div>{children}</div>;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~styles/global.scss';
@use '../../../styles/global.scss';

.specificFill {
fill: global.$primaryWhite !important;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ComposerEditor/ComposerEditor.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~styles/global';
@use '../../styles/global';

.inputContainer {
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainComposer/MainComposer.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '~styles/global.scss';
@use '../../styles/global';

.wrapper {
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use '../../styles/global';
@use '../../../../../../styles/global';

.wrapper {
overflow: hidden;
Expand Down Expand Up @@ -33,7 +33,7 @@
gap: 1rem;

p {
color: $secondaryPurple;
color: global.$secondaryPurple;
font-size: 1.6rem;
}
}
Expand All @@ -42,12 +42,12 @@
gap: 0.8rem;

span {
color: $tertiaryGray;
color: global.$tertiaryGray;
font-size: 1.2rem;
font-weight: 500;
}

.error {
color: $secondaryRed;
color: global.$secondaryRed;
}
}
10 changes: 6 additions & 4 deletions src/styles/base.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
@use './global';

@import '~normalize.css/normalize.css';
@import '../../node_modules/normalize.css/normalize.css';

* {
box-sizing: border-box;
}

html,
body {
html {
font-family: global.$mainFont;
font-size: 62.5%;
}

body {
font-size: 1.6rem;
}

button {
width: 100%;

Expand Down

0 comments on commit c12a7df

Please sign in to comment.