mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +02:00
feat: rough style first question page of feedback component.
This commit is contained in:
parent
aa3fb6c4e2
commit
a6191f5ab8
@ -1,3 +1,5 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
stories: [
|
||||
'../src/**/*.stories.mdx',
|
||||
@ -16,4 +18,8 @@ module.exports = {
|
||||
to: '/',
|
||||
},
|
||||
],
|
||||
webpackFinal: async (config) => {
|
||||
config.resolve.alias['@site'] = path.resolve(__dirname, '../');
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
@ -1,8 +1,15 @@
|
||||
import React from 'react';
|
||||
import styles from './styles.module.css';
|
||||
import CloseIcon from '@site/src/icons/close'
|
||||
|
||||
const Component = ({ text }) => (
|
||||
<article className="user-feedback">
|
||||
<div className="close-button-row">
|
||||
<button className="close-button" onClick={() => console.log("add some close button action")}>
|
||||
<span className="visually-hidden">close feedback popup</span>
|
||||
<CloseIcon/>
|
||||
</button>
|
||||
</div>
|
||||
<form className={styles.bah}>
|
||||
<p>
|
||||
<span className="visually-hidden">
|
||||
@ -36,6 +43,7 @@ const Component = ({ text }) => (
|
||||
<span aria-hidden="true">Very satisfied</span>
|
||||
</div>
|
||||
<div className="button-container">
|
||||
<button className="button-secondary">Skip</button>
|
||||
<button type="submit">Next</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -8,18 +8,31 @@
|
||||
padding: var(--ifm-spacing-vertical) var(--ifm-spacing-horizontal);
|
||||
text-align: center;
|
||||
--outline-style: 2px solid var(--ifm-color-primary);
|
||||
--row-gap: 1rem;
|
||||
--element-horizontal-gap: 1rem;
|
||||
}
|
||||
|
||||
.user-feedback > * + * {
|
||||
margin-top: var(--row-gap);
|
||||
}
|
||||
|
||||
.user-feedback button {
|
||||
border: none;
|
||||
border-radius: var(--ifm-global-radius);
|
||||
padding: var(--ifm-spacing-vertical) var(--ifm-spacing-horizontal);
|
||||
}
|
||||
|
||||
.user-feedback > form {
|
||||
max-width: 850px;
|
||||
margin: auto;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.user-feedback * {
|
||||
outline-offset: 4px;
|
||||
}
|
||||
|
||||
.user-feedback *:focus {
|
||||
.user-feedback *:focus-visible {
|
||||
outline: var(--outline-style);
|
||||
}
|
||||
|
||||
@ -27,7 +40,7 @@
|
||||
display: flex;
|
||||
place-content: center;
|
||||
align-items: center;
|
||||
gap: 1em;
|
||||
gap: var(--element-horizontal-gap);
|
||||
}
|
||||
|
||||
|
||||
@ -56,8 +69,50 @@
|
||||
}
|
||||
|
||||
.button-container {
|
||||
margin-top: var(--row-gap);
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
gap: var(--element-horizontal-gap);
|
||||
}
|
||||
|
||||
button.close-button {
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
padding: 0;
|
||||
aspect-ratio: 1;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
.close-button:hover{
|
||||
color: var(--ifm-color-primary);
|
||||
}
|
||||
|
||||
.close-button:active{
|
||||
color: var(--ifm-color-primary-darker);
|
||||
}
|
||||
|
||||
.close-button-row {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.bah {}
|
||||
.user-feedback button[type=submit] {
|
||||
background-color: var(--ifm-color-primary);
|
||||
color: var(--ifm-color-primary-contrast-background);
|
||||
padding-inline: calc(var(--ifm-spacing-horizontal) * 4);
|
||||
}
|
||||
|
||||
.user-feedback button[type=submit]:active {
|
||||
background-color: var(--ifm-color-primary-dark);
|
||||
}
|
||||
|
||||
.button-secondary {
|
||||
color: var(--ifm-color-primary);
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
.button-secondary:active {
|
||||
color: var(--ifm-color-primary-darker);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ footer {
|
||||
}
|
||||
|
||||
html[data-theme='light'] {
|
||||
--ifm-color-primary: #39535b;
|
||||
--ifm-color-primary: var(--unleash-color-purple);
|
||||
--ifm-color-primary-dark: #334b52;
|
||||
--ifm-color-primary-darker: #30474d;
|
||||
--ifm-color-primary-darkest: #283a40;
|
||||
|
15
website/src/icons/close.jsx
Normal file
15
website/src/icons/close.jsx
Normal file
@ -0,0 +1,15 @@
|
||||
import './styles.css';
|
||||
|
||||
const svg = () => (
|
||||
<svg
|
||||
className="icon"
|
||||
viewBox="0 0 12 12"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path d="m6 5.293 4.789-4.79.707.708-4.79 4.79 4.79 4.789-.707.707-4.79-4.79-4.789 4.79-.707-.707L5.293 6 .502 1.211 1.21.504 6 5.294z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const Icon = svg;
|
||||
|
||||
export default Icon;
|
5
website/src/icons/styles.css
Normal file
5
website/src/icons/styles.css
Normal file
@ -0,0 +1,5 @@
|
||||
.icon {
|
||||
fill: currentColor;
|
||||
border-radius: 50%;
|
||||
aspect-ratio: 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user