Skip to content

Commit

Permalink
fix(ods): forward style correctly to allow @use usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dpellier committed Jul 29, 2024
1 parent 57f9aab commit 892aa53
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 41 deletions.
12 changes: 2 additions & 10 deletions packages/examples/react-webpack/src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useEffect, useState } from 'react';
import { ODS_SPINNER_SIZE, ODS_TEXT_PRESET } from '@ovhcloud/ods-components';
import { OdsSpinner, OdsText } from '@ovhcloud/ods-components/react';
import { ODS_SPINNER_SIZE } from '@ovhcloud/ods-components';
import { OdsSpinner } from '@ovhcloud/ods-components/react';
import { ODS_THEME } from '@ovhcloud/ods-themes';
import { OText } from './OText';
import styles from './app.scss';

const App = () => {
Expand Down Expand Up @@ -30,13 +29,6 @@ const App = () => {
Headline with ODS mixin
</h1>

<OdsText preset={ ODS_TEXT_PRESET.headline }
onFocusEvent={ (e) => console.log(e) }>
ODS Text Headline
</OdsText>

<OText preset={ ODS_TEXT_PRESET.headline } />

<OdsSpinner size={ ODS_SPINNER_SIZE.sm } />
<OdsSpinner />
<OdsSpinner size="lg" />
Expand Down
28 changes: 0 additions & 28 deletions packages/examples/react-webpack/src/app/OText.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion packages/examples/react-webpack/src/app/app.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//@use '@ovhcloud/ods-components/style' as ods;
@import '@ovhcloud/ods-components/style';

.app {
&__title {
@extend %ods-headline;
//@include ods.ods-headline();
@include ods-headline();
}

&__spinner {
Expand Down
2 changes: 1 addition & 1 deletion packages/ods/src/style/index.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@use 'text';
@forward 'text';
2 changes: 1 addition & 1 deletion packages/ods/style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "Apache-2.0",
"main": "./dist/index.scss",
"scripts": {
"build": "shx cp -r ../src/style ./dist",
"build": "npm run clean && shx cp -r ../src/style ./dist",
"clean": "rimraf dist"
},
"devDependencies": {
Expand Down

0 comments on commit 892aa53

Please sign in to comment.