Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
monorepo f-field global styles added
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr committed Oct 8, 2023
1 parent 2fcc586 commit 1a81a22
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
12 changes: 12 additions & 0 deletions packages/flow-core/src/components/f-field/f-field-global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@import "./../../mixins/scss/mixins";

f-field {
width: 100%;
&[variant="inline"] {
flex: 0 0 auto;
width: fit-content;
}
&[disabled] {
@include disabled();
}
}
12 changes: 0 additions & 12 deletions packages/flow-core/src/components/f-field/f-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,3 @@ $sizes: (
}
}
}

f-field {
width: 100%;
&[variant="inline"] {
flex: 0 0 auto;
width: fit-content;
}
&[disabled] {
@include disabled();
}
// flex: 1 0 auto;
}
5 changes: 4 additions & 1 deletion packages/flow-core/src/components/f-field/f-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { FRoot } from "../../mixins/components/f-root/f-root";
import { FDiv } from "../f-div/f-div";
import { FText } from "../f-text/f-text";
import eleStyle from "./f-field.scss?inline";
import globalStyle from "./f-field-global.scss?inline";
import { flowElement } from "./../../utils";
import { injectCss } from "@cldcvr/flow-core-config";
injectCss("f-field", globalStyle);

export type FFieldStateProp = "default" | "primary" | "success" | "danger" | "warning";
/**
Expand All @@ -15,7 +18,7 @@ export class FField extends FRoot {
/**
* css loaded from scss file
*/
static styles = [unsafeCSS(eleStyle), ...FDiv.styles, ...FText.styles];
static styles = [unsafeCSS(eleStyle), unsafeCSS(globalStyle), ...FDiv.styles, ...FText.styles];

/**
* @attribute States on f-field are used to communicate purpose and it’s connotation.
Expand Down

0 comments on commit 1a81a22

Please sign in to comment.