woocommerce/plugins/woocommerce-admin/client/core-profiler/style.scss

125 lines
2.2 KiB
SCSS
Raw Normal View History

Add core profiler "Welcome to Woo!" page (#37952) * Add core profiler - welcome to woo page * Add changelog * Update checkbox styles * Update copies * Add test * Add enable prop to window.wcTracks type * Add tracks * Add explat changelog * Fix import * Update default tracking value * Update copies * Fix test * using invoked promise instead of useState - take advantage of xstate's built ins for side effects instead of useEffect/hooks - discovered that error result wasn't really handled in original useEffect - use text labels instead of inline functions so that we can decouple the implementation from the machine model - todo: can move the invoked function out elsewhere and also tests if needed (not necessary here because it's a simple call) * use actions.choose instead of branching inside action - https://stately.ai/docs/xstate/transitions-and-choices/guarded-actions#the-choose-action - makes it so that the machine model is serializeable - todo: in the distant future i wonder if it might be tidier to have tracks be its own actor that just receives the same events that this machine does, that way it's just standalone instead of mixing up tracks with the implementation * use dispatch instead of useDispatch - decouples the implementation of the handler from the react component - makes the handler testable on its own if needed - makes the state machine testable without relying on external dependencies * decoupled remaining function calls * Fix lint error * Fix style lint * address xstate console warnings - .withConfig() is a function call that returns a new object every invocation so we need to wrap it in useMemo to keep it stable * Add optInDataSharing is false test * Fix lint --------- Co-authored-by: rjchow <me@rjchow.com>
2023-05-03 07:54:28 +00:00
.woocommerce-profile-wizard__body {
background-color: #fff;
#woocommerce-layout__primary {
margin: 0;
width: 100%;
}
.woocommerce-layout__main {
padding-right: 0;
}
}
.woocommerce-profiler-page__content {
display: flex;
align-items: center;
flex-direction: column;
@include breakpoint( '<782px' ) {
padding: 0 20px;
}
}
// Intro opt-in page
.woocommerce-profiler-intro-opt-in {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.woocommerce-profiler-intro-opt-in__content {
padding-top: 81px;
flex: 1;
@include breakpoint( '<782px' ) {
padding-top: 70px;
}
.woocommerce-profiler-heading {
max-width: 520px;
}
.woocommerce-profiler-welcome-image {
margin-bottom: 48px;
width: 266px;
height: 172px;
background: url(./assets/images/welcome-desktop.svg) no-repeat center center;
@include breakpoint( '<782px' ) {
margin-bottom: 40px;
background: url(./assets/images/welcome-mobile.svg) no-repeat center center;
width: 222px;
height: 144px;
}
}
.woocommerce-profiler-setup-store__button {
padding: 10px 16px;
width: 200px;
height: 54px;
display: flex;
justify-content: center;
align-items: center;
@include breakpoint( '<782px' ) {
width: 100%;
margin-top: auto;
}
}
.woocommerce-profiler-intro-opt-in__footer {
margin: auto auto 40px;
display: flex;
justify-content: center;
@include breakpoint( '<782px' ) {
margin: 16px auto 20px;
}
.woocommerce-profiler-intro-opt-in__checkbox {
input {
box-shadow: 0 0 0 2px #fff, 0 0 0 4px $gray-700;
outline: 2px solid transparent;
width: 16px;
height: 16px;
}
.components-checkbox-control__input-container {
width: 16px;
height: 16px;
margin-left: 5px;
}
svg.components-checkbox-control__checked {
width: 20px;
height: 20px;
@include breakpoint( '<782px' ) {
width: 16px;
height: 16px;
}
}
.components-base-control__field {
margin-bottom: 0;
display: flex;
align-items: center;
}
.components-checkbox-control__label {
display: inline-block;
color: $gray-700;
font-size: 13px;
line-height: 16px;
max-width: 514px;
margin-left: 10px;
}
}
a {
color: $gray-700;
}
}
}