6 examples of 'material ui button color' in JavaScript

Every line of 'material ui button color' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
19get color() {
20 return ColorButton.getColor(this.handle);
21}
37get color(): ColorTheme {
38 return this._color;
39}
6function Button({
7 size = 1,
8 disabled,
9 danger,
10 variant = 'primary',
11 css,
12 ...props
13}) {
14 const isPrimary = variant === 'primary'
15 const bgColor = danger ? theme.colors.danger : theme.colors.primary
16
17 const bg = isPrimary ? bgColor : transparentize(0.88, bgColor)
18 const color = isPrimary ? theme.colors.white : theme.colors.primary
19
20 return (
21 <>
22
23
24 </>
25 )
26}
283private getActionButtonColor() {
284 // コントラスト比4.5(chromeの推奨する最低ライン)の色
285 const contrastLimitColor = '#697b8c';
286
287 const actionButton = document.querySelector(
288 '.ProfileTweet-actionButton'
289 ) as HTMLElement;
290 if (!(actionButton && actionButton.style)) {
291 return contrastLimitColor;
292 }
293
294 const buttonColor = window.getComputedStyle(actionButton).color;
295 if (buttonColor && buttonColor.length > 0) {
296 return buttonColor;
297 }
298 return contrastLimitColor;
299}
76@Input() set color(value: string) {
77 if (value !== 'gray') {
78 this._colorTemp = value;
79 this.setColor(value);
80 }
81}
97public set color(value: Color | undefined) {
98 this._color = value;
99 this.titleLabel.textColor = value || this.tintColor;
100}

Related snippets