Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

386 lignes
9.5 KiB

  1. import {
  2. hexToRGBAlpha,
  3. grayColor,
  4. roseColor,
  5. primaryColor,
  6. infoColor,
  7. successColor,
  8. warningColor,
  9. dangerColor
  10. } from "assets/jss/nextjs-material-kit.js";
  11. const buttonStyle = {
  12. button: {
  13. minHeight: "auto",
  14. minWidth: "auto",
  15. backgroundColor: grayColor,
  16. color: "#FFFFFF",
  17. boxShadow:
  18. "0 2px 2px 0 rgba(153, 153, 153, 0.14), 0 3px 1px -2px rgba(153, 153, 153, 0.2), 0 1px 5px 0 rgba(153, 153, 153, 0.12)",
  19. border: "none",
  20. borderRadius: "3px",
  21. position: "relative",
  22. padding: "12px 30px",
  23. margin: ".3125rem 1px",
  24. fontSize: "12px",
  25. fontWeight: "400",
  26. textTransform: "uppercase",
  27. letterSpacing: "0",
  28. willChange: "box-shadow, transform",
  29. transition:
  30. "box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
  31. lineHeight: "1.42857143",
  32. textAlign: "center",
  33. whiteSpace: "nowrap",
  34. verticalAlign: "middle",
  35. touchAction: "manipulation",
  36. cursor: "pointer",
  37. "&:hover,&:focus": {
  38. color: "#FFFFFF",
  39. backgroundColor: grayColor,
  40. boxShadow:
  41. "0 14px 26px -12px rgba(153, 153, 153, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(153, 153, 153, 0.2)"
  42. },
  43. "& .fab,& .fas,& .far,& .fal,& .material-icons": {
  44. position: "relative",
  45. display: "inline-block",
  46. top: "0",
  47. fontSize: "1.1rem",
  48. marginRight: "4px",
  49. verticalAlign: "middle"
  50. },
  51. "& svg": {
  52. position: "relative",
  53. display: "inline-block",
  54. top: "0",
  55. width: "18px",
  56. height: "18px",
  57. marginRight: "4px",
  58. verticalAlign: "middle"
  59. },
  60. "&$justIcon": {
  61. "& .fab,& .fas,& .far,& .fal,& .material-icons": {
  62. marginRight: "0px",
  63. position: "absolute",
  64. width: "100%",
  65. transform: "none",
  66. left: "0px",
  67. top: "0px",
  68. height: "100%",
  69. lineHeight: "41px",
  70. fontSize: "20px"
  71. }
  72. }
  73. },
  74. fullWidth: {
  75. width: "100%"
  76. },
  77. primary: {
  78. backgroundColor: primaryColor,
  79. boxShadow: `0 2px 2px 0 ${hexToRGBAlpha(
  80. primaryColor,
  81. 0.14
  82. )}, 0 3px 1px -2px ${hexToRGBAlpha(
  83. primaryColor,
  84. 0.2
  85. )}, 0 1px 5px 0 ${hexToRGBAlpha(primaryColor, 0.12)}`,
  86. "&:hover,&:focus": {
  87. backgroundColor: primaryColor,
  88. boxShadow: `0 14px 26px -12px ${hexToRGBAlpha(
  89. primaryColor,
  90. 0.42
  91. )}, 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px ${hexToRGBAlpha(
  92. primaryColor,
  93. 0.2
  94. )}`
  95. }
  96. },
  97. info: {
  98. backgroundColor: infoColor,
  99. boxShadow: `0 2px 2px 0 ${hexToRGBAlpha(
  100. infoColor,
  101. 0.14
  102. )}, 0 3px 1px -2px ${hexToRGBAlpha(
  103. infoColor,
  104. 0.2
  105. )}, 0 1px 5px 0 ${hexToRGBAlpha(infoColor, 0.12)}`,
  106. "&:hover,&:focus": {
  107. backgroundColor: infoColor,
  108. boxShadow: `0 14px 26px -12px ${hexToRGBAlpha(
  109. infoColor,
  110. 0.42
  111. )}, 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px ${hexToRGBAlpha(
  112. infoColor,
  113. 0.2
  114. )}`
  115. }
  116. },
  117. success: {
  118. backgroundColor: successColor,
  119. boxShadow: `0 2px 2px 0 ${hexToRGBAlpha(
  120. successColor,
  121. 0.14
  122. )}, 0 3px 1px -2px ${hexToRGBAlpha(
  123. successColor,
  124. 0.2
  125. )}, 0 1px 5px 0 ${hexToRGBAlpha(successColor, 0.12)}`,
  126. "&:hover,&:focus": {
  127. backgroundColor: successColor,
  128. boxShadow: `0 14px 26px -12px ${hexToRGBAlpha(
  129. successColor,
  130. 0.42
  131. )}, 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px ${hexToRGBAlpha(
  132. successColor,
  133. 0.2
  134. )}`
  135. }
  136. },
  137. warning: {
  138. backgroundColor: warningColor,
  139. boxShadow: `0 2px 2px 0 ${hexToRGBAlpha(
  140. warningColor,
  141. 0.14
  142. )}, 0 3px 1px -2px ${hexToRGBAlpha(
  143. warningColor,
  144. 0.2
  145. )}, 0 1px 5px 0 ${hexToRGBAlpha(warningColor, 0.12)}`,
  146. "&:hover,&:focus": {
  147. backgroundColor: warningColor,
  148. boxShadow: `0 14px 26px -12px ${hexToRGBAlpha(
  149. warningColor,
  150. 0.42
  151. )}, 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px ${hexToRGBAlpha(
  152. warningColor,
  153. 0.2
  154. )}`
  155. }
  156. },
  157. danger: {
  158. backgroundColor: dangerColor,
  159. boxShadow: `0 2px 2px 0 ${hexToRGBAlpha(
  160. dangerColor,
  161. 0.14
  162. )}, 0 3px 1px -2px ${hexToRGBAlpha(
  163. dangerColor,
  164. 0.2
  165. )}, 0 1px 5px 0 ${hexToRGBAlpha(dangerColor, 0.12)}`,
  166. "&:hover,&:focus": {
  167. backgroundColor: dangerColor,
  168. boxShadow: `0 14px 26px -12px ${hexToRGBAlpha(
  169. dangerColor,
  170. 0.42
  171. )}, 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px ${hexToRGBAlpha(
  172. dangerColor,
  173. 0.2
  174. )}`
  175. }
  176. },
  177. rose: {
  178. backgroundColor: roseColor,
  179. boxShadow: `0 2px 2px 0 ${hexToRGBAlpha(
  180. primaryColor,
  181. 0.14
  182. )}, 0 3px 1px -2px ${hexToRGBAlpha(
  183. primaryColor,
  184. 0.2
  185. )}, 0 1px 5px 0 ${hexToRGBAlpha(primaryColor, 0.12)}`,
  186. "&:hover,&:focus": {
  187. backgroundColor: roseColor,
  188. boxShadow: `0 14px 26px -12px ${hexToRGBAlpha(
  189. primaryColor,
  190. 0.42
  191. )}, 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px ${hexToRGBAlpha(
  192. primaryColor,
  193. 0.2
  194. )}`
  195. }
  196. },
  197. white: {
  198. "&,&:focus,&:hover,&:visited": {
  199. backgroundColor: "#FFFFFF",
  200. color: grayColor
  201. }
  202. },
  203. twitter: {
  204. backgroundColor: "#55acee",
  205. color: "#fff",
  206. boxShadow:
  207. "0 2px 2px 0 rgba(85, 172, 238, 0.14), 0 3px 1px -2px rgba(85, 172, 238, 0.2), 0 1px 5px 0 rgba(85, 172, 238, 0.12)",
  208. "&:hover,&:focus,&:visited": {
  209. backgroundColor: "#55acee",
  210. color: "#fff",
  211. boxShadow:
  212. "0 14px 26px -12px rgba(85, 172, 238, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(85, 172, 238, 0.2)"
  213. }
  214. },
  215. facebook: {
  216. backgroundColor: "#3b5998",
  217. color: "#fff",
  218. boxShadow:
  219. "0 2px 2px 0 rgba(59, 89, 152, 0.14), 0 3px 1px -2px rgba(59, 89, 152, 0.2), 0 1px 5px 0 rgba(59, 89, 152, 0.12)",
  220. "&:hover,&:focus": {
  221. backgroundColor: "#3b5998",
  222. color: "#fff",
  223. boxShadow:
  224. "0 14px 26px -12px rgba(59, 89, 152, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(59, 89, 152, 0.2)"
  225. }
  226. },
  227. google: {
  228. backgroundColor: "#dd4b39",
  229. color: "#fff",
  230. boxShadow:
  231. "0 2px 2px 0 rgba(221, 75, 57, 0.14), 0 3px 1px -2px rgba(221, 75, 57, 0.2), 0 1px 5px 0 rgba(221, 75, 57, 0.12)",
  232. "&:hover,&:focus": {
  233. backgroundColor: "#dd4b39",
  234. color: "#fff",
  235. boxShadow:
  236. "0 14px 26px -12px rgba(221, 75, 57, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(221, 75, 57, 0.2)"
  237. }
  238. },
  239. github: {
  240. backgroundColor: "#333333",
  241. color: "#fff",
  242. boxShadow:
  243. "0 2px 2px 0 rgba(51, 51, 51, 0.14), 0 3px 1px -2px rgba(51, 51, 51, 0.2), 0 1px 5px 0 rgba(51, 51, 51, 0.12)",
  244. "&:hover,&:focus": {
  245. backgroundColor: "#333333",
  246. color: "#fff",
  247. boxShadow:
  248. "0 14px 26px -12px rgba(51, 51, 51, 0.42), 0 4px 23px 0px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(51, 51, 51, 0.2)"
  249. }
  250. },
  251. simple: {
  252. "&,&:focus,&:hover,&:visited": {
  253. color: "#FFFFFF",
  254. background: "transparent",
  255. boxShadow: "none"
  256. },
  257. "&$primary": {
  258. "&,&:focus,&:hover,&:visited": {
  259. color: primaryColor
  260. }
  261. },
  262. "&$info": {
  263. "&,&:focus,&:hover,&:visited": {
  264. color: infoColor
  265. }
  266. },
  267. "&$success": {
  268. "&,&:focus,&:hover,&:visited": {
  269. color: successColor
  270. }
  271. },
  272. "&$warning": {
  273. "&,&:focus,&:hover,&:visited": {
  274. color: warningColor
  275. }
  276. },
  277. "&$rose": {
  278. "&,&:focus,&:hover,&:visited": {
  279. color: roseColor
  280. }
  281. },
  282. "&$danger": {
  283. "&,&:focus,&:hover,&:visited": {
  284. color: dangerColor
  285. }
  286. },
  287. "&$twitter": {
  288. "&,&:focus,&:hover,&:visited": {
  289. color: "#55acee"
  290. }
  291. },
  292. "&$facebook": {
  293. "&,&:focus,&:hover,&:visited": {
  294. color: "#3b5998"
  295. }
  296. },
  297. "&$google": {
  298. "&,&:focus,&:hover,&:visited": {
  299. color: "#dd4b39"
  300. }
  301. },
  302. "&$github": {
  303. "&,&:focus,&:hover,&:visited": {
  304. color: "#333333"
  305. }
  306. }
  307. },
  308. transparent: {
  309. "&,&:focus,&:hover,&:visited": {
  310. color: "inherit",
  311. background: "transparent",
  312. boxShadow: "none"
  313. }
  314. },
  315. disabled: {
  316. opacity: "0.65",
  317. pointerEvents: "none"
  318. },
  319. lg: {
  320. padding: "1.125rem 2.25rem",
  321. fontSize: "0.875rem",
  322. lineHeight: "1.333333",
  323. borderRadius: "0.2rem"
  324. },
  325. sm: {
  326. padding: "0.40625rem 1.25rem",
  327. fontSize: "0.6875rem",
  328. lineHeight: "1.5",
  329. borderRadius: "0.2rem"
  330. },
  331. round: {
  332. borderRadius: "30px"
  333. },
  334. block: {
  335. width: "100% !important"
  336. },
  337. link: {
  338. "&,&:hover,&:focus": {
  339. backgroundColor: "transparent",
  340. color: "#999999",
  341. boxShadow: "none"
  342. }
  343. },
  344. justIcon: {
  345. paddingLeft: "12px",
  346. paddingRight: "12px",
  347. fontSize: "20px",
  348. height: "41px",
  349. minWidth: "41px",
  350. width: "41px",
  351. "& .fab,& .fas,& .far,& .fal,& svg,& .material-icons": {
  352. marginRight: "0px"
  353. },
  354. "&$lg": {
  355. height: "57px",
  356. minWidth: "57px",
  357. width: "57px",
  358. lineHeight: "56px",
  359. "& .fab,& .fas,& .far,& .fal,& .material-icons": {
  360. fontSize: "32px",
  361. lineHeight: "56px"
  362. },
  363. "& svg": {
  364. width: "32px",
  365. height: "32px"
  366. }
  367. },
  368. "&$sm": {
  369. height: "30px",
  370. minWidth: "30px",
  371. width: "30px",
  372. "& .fab,& .fas,& .far,& .fal,& .material-icons": {
  373. fontSize: "17px",
  374. lineHeight: "29px"
  375. },
  376. "& svg": {
  377. width: "17px",
  378. height: "17px"
  379. }
  380. }
  381. }
  382. };
  383. export default buttonStyle;