diff --git a/ghost/portal/src/components/common/ActionButton.js b/ghost/portal/src/components/common/ActionButton.js index 16d922cc63..30a2169bd3 100644 --- a/ghost/portal/src/components/common/ActionButton.js +++ b/ghost/portal/src/components/common/ActionButton.js @@ -2,7 +2,7 @@ import React from 'react'; import getContrastColor from '../../utils/contrast-color'; export const ActionButtonStyles = ` -.gh-portal-btn { +.ghp-btn { position: relative; display: inline-block; padding: 0 1.8rem; @@ -23,7 +23,7 @@ export const ActionButtonStyles = ` width: 100%; } -.gh-portal-btn:hover::before { +.ghp-btn:hover::before { position: absolute; content: ""; top: 0; @@ -57,7 +57,7 @@ const Styles = ({brandColor, retry, disabled, style = {}}) => { function ActionButton({label, onClick, disabled, retry, brandColor, style}) { let Style = Styles({disabled, retry, brandColor, style}); return ( - ); diff --git a/ghost/portal/src/components/common/Switch.js b/ghost/portal/src/components/common/Switch.js index 5457f7c94f..1784ab5707 100644 --- a/ghost/portal/src/components/common/Switch.js +++ b/ghost/portal/src/components/common/Switch.js @@ -1,95 +1,95 @@ import React from 'react'; export const SwitchStyles = ` -.for-switch label, -.for-switch .container { - cursor: pointer; - position: relative; - display: inline-block; - width: 50px !important; - height: 28px !important; -} + .ghp-for-switch label, + .ghp-for-switch .container { + cursor: pointer; + position: relative; + display: inline-block; + width: 50px !important; + height: 28px !important; + } -.for-switch label p, -.for-switch .container p { - overflow: auto; - color: #15171A; - font-weight: normal; -} + .ghp-for-switch label p, + .ghp-for-switch .container p { + overflow: auto; + color: #15171A; + font-weight: normal; + } -.for-switch input { - opacity: 0; - width: 0; - height: 0; -} + .ghp-for-switch input { + opacity: 0; + width: 0; + height: 0; + } -.for-switch .input-toggle-component { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: #e5eff5; - border: 1px solid #dae8f1; - transition: .3s; - width: 50px !important; - height: 28px !important; - border-radius: 999px; - transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out; -} + .ghp-for-switch .input-toggle-component { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: #e5eff5; + border: 1px solid #dae8f1; + transition: .3s; + width: 50px !important; + height: 28px !important; + border-radius: 999px; + transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out; + } -.for-switch label:hover input:not(:checked) + .input-toggle-component, -.for-switch .container:hover input:not(:checked) + .input-toggle-component { - border-color: #c5d7e2; -} + .ghp-for-switch label:hover input:not(:checked) + .input-toggle-component, + .ghp-for-switch .container:hover input:not(:checked) + .input-toggle-component { + border-color: #c5d7e2; + } -.for-switch .input-toggle-component:before { - position: absolute; - content: ""; - height: 22px !important; - width: 22px !important; - left: 2px !important; - top: 2px !important; - background-color: white; - transition: .3s; - box-shadow: 0 0 1px rgba(0,0,0,.6), 0 2px 3px rgba(0,0,0,.2); - border-radius: 999px; -} + .ghp-for-switch .input-toggle-component:before { + position: absolute; + content: ""; + height: 22px !important; + width: 22px !important; + left: 2px !important; + top: 2px !important; + background-color: white; + transition: .3s; + box-shadow: 0 0 1px rgba(0,0,0,.6), 0 2px 3px rgba(0,0,0,.2); + border-radius: 999px; + } -.for-switch input:checked + .input-toggle-component { - background: #a4d037; - border-color: transparent; -} + .ghp-for-switch input:checked + .input-toggle-component { + background: #a4d037; + border-color: transparent; + } -.for-switch input:checked + .input-toggle-component:before { - transform: translateX(22px); -} + .ghp-for-switch input:checked + .input-toggle-component:before { + transform: translateX(22px); + } -.for-switch .container { - width: 38px !important; - height: 22px !important; -} + .ghp-for-switch .container { + width: 38px !important; + height: 22px !important; + } -.for-switch.small .input-toggle-component { - width: 38px !important; - height: 22px !important; -} + .ghp-for-switch.small .input-toggle-component { + width: 38px !important; + height: 22px !important; + } -.for-switch.small .input-toggle-component:before { - height: 16px !important; - width: 16px !important; - box-shadow: 0 0 1px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.1); -} + .ghp-for-switch.small .input-toggle-component:before { + height: 16px !important; + width: 16px !important; + box-shadow: 0 0 1px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.1); + } -.for-switch.small input:checked + .input-toggle-component:before { - transform: translateX(16px); -} + .ghp-for-switch.small input:checked + .input-toggle-component:before { + transform: translateX(16px); + } `; function Switch({id, label, onToggle, checked = false}) { return ( -
+