-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI: Standarize colors and themify the app(First step) (#1485)
- Loading branch information
1 parent
59acc62
commit a16cbed
Showing
43 changed files
with
264 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,6 @@ bl-file-group-create-form { | |
|
||
p.exists { | ||
margin-top: -10px; | ||
color: $infoText; | ||
color: $primary-color; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { CssColor, ThemeElement } from "./theme-core"; | ||
|
||
class InputColors extends ThemeElement<any> { | ||
@CssColor() public background: string; | ||
@CssColor() public text: string; | ||
} | ||
|
||
class MainTheme extends ThemeElement<any> { | ||
@CssColor() public basic: string; | ||
@CssColor("custom-name") public customName: string; | ||
@CssColor() public input: InputColors; | ||
} | ||
|
||
const fullTheme = new MainTheme({ | ||
"basic": "red", | ||
"custom-name": "blue", | ||
"input": { | ||
background: "green", | ||
text: "white", | ||
}, | ||
}); | ||
|
||
const partialTheme = new MainTheme({ | ||
"custom-name": "yellow", | ||
"input": { | ||
background: "orange", | ||
}, | ||
}); | ||
|
||
describe("ThemeCore", () => { | ||
it("create a theme from definition", () => { | ||
expect(fullTheme.basic).toEqual("red"); | ||
expect(fullTheme.customName).toEqual("blue"); | ||
expect(fullTheme.input.background).toEqual("green"); | ||
expect(fullTheme.input.text).toEqual("white"); | ||
}); | ||
|
||
it("merges theme into an empty theme", () => { | ||
const theme = new MainTheme({}).merge(fullTheme); | ||
|
||
expect(theme.basic).toEqual("red"); | ||
expect(theme.customName).toEqual("blue"); | ||
expect(theme.input.background).toEqual("green"); | ||
expect(theme.input.text).toEqual("white"); | ||
}); | ||
|
||
it("merges a partial theme", () => { | ||
const theme = new MainTheme({}).merge(fullTheme).merge(partialTheme); | ||
|
||
expect(theme.basic).toEqual("red"); | ||
expect(theme.customName).toEqual("yellow"); | ||
expect(theme.input.background).toEqual("orange"); | ||
expect(theme.input.text).toEqual("white"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ bl-refresh-btn { | |
} | ||
|
||
.fa-ban { | ||
color: $errorText; | ||
color: $danger-color; | ||
} |
Oops, something went wrong.