From 6e2072bca477608468e0f1857f8f5db9ee436675 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 25 Feb 2022 17:10:29 +0100 Subject: [PATCH] chore: first feedback page --- website/src/components/UserFeedback/index.jsx | 20 ++++++++++--------- .../components/UserFeedback/styles.module.css | 11 +++++++++- website/src/icons/close.jsx | 5 +++-- .../icons/{styles.css => styles.module.css} | 0 website/src/theme/Root.js | 3 ++- 5 files changed, 26 insertions(+), 13 deletions(-) rename website/src/icons/{styles.css => styles.module.css} (100%) diff --git a/website/src/components/UserFeedback/index.jsx b/website/src/components/UserFeedback/index.jsx index 6245a5c2cd..fd4a1af39d 100644 --- a/website/src/components/UserFeedback/index.jsx +++ b/website/src/components/UserFeedback/index.jsx @@ -2,15 +2,17 @@ import React from 'react'; import styles from './styles.module.css'; import CloseIcon from '@site/src/icons/close' +const join = (...cs) => cs.join(" ") + const Component = ({ text }) => ( -
-
-
-
+

On a scale from 1 to 5 where 1 is very unsatisfied and 5 is @@ -20,12 +22,12 @@ const Component = ({ text }) => ( documentation?

-
+
{[1, 2, 3, 4, 5].map((n) => ( ( value={n} />
-
- +
+
diff --git a/website/src/components/UserFeedback/styles.module.css b/website/src/components/UserFeedback/styles.module.css index 7157a54691..fea0099b37 100644 --- a/website/src/components/UserFeedback/styles.module.css +++ b/website/src/components/UserFeedback/styles.module.css @@ -1,6 +1,7 @@ .user-feedback { width: 100%; position: absolute; + background: var(--ifm-background-color); bottom: 0; border: var(--ifm-global-border-width) solid var(--unleash-color-gray); border-radius: var(--ifm-global-radius) var(--ifm-global-radius) 0 0; @@ -99,10 +100,14 @@ button.close-button { .user-feedback button[type=submit] { background-color: var(--ifm-color-primary); - color: var(--ifm-color-primary-contrast-background); + color: var(--ifm-background-color); padding-inline: calc(var(--ifm-spacing-horizontal) * 4); } +.user-feedback button[type=submit]:hover { + background-color: var(--ifm-color-primary-lighter); +} + .user-feedback button[type=submit]:active { background-color: var(--ifm-color-primary-dark); } @@ -116,3 +121,7 @@ button.close-button { .button-secondary:active { color: var(--ifm-color-primary-darker); } + +.button-secondary:hover { + color: var(--ifm-color-primary-lightest); +} diff --git a/website/src/icons/close.jsx b/website/src/icons/close.jsx index ce59a0fd6c..4bb6d4de54 100644 --- a/website/src/icons/close.jsx +++ b/website/src/icons/close.jsx @@ -1,8 +1,9 @@ -import './styles.css'; +import React from 'react'; +import styles from './styles.module.css'; const svg = () => ( diff --git a/website/src/icons/styles.css b/website/src/icons/styles.module.css similarity index 100% rename from website/src/icons/styles.css rename to website/src/icons/styles.module.css diff --git a/website/src/theme/Root.js b/website/src/theme/Root.js index aa2ffad302..aa8e2a42b1 100644 --- a/website/src/theme/Root.js +++ b/website/src/theme/Root.js @@ -5,7 +5,8 @@ import UF from '@site/src/components/UserFeedback'; function Root({ children }) { return ( <> - {children} + + {children} ); }