-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(toolbar): Update control toolbars to latest design (#1358)
- Loading branch information
Showing
45 changed files
with
305 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
@import '~box-ui-elements/es/styles/variables'; | ||
@import '../styles'; | ||
|
||
.bp-ControlsBar { | ||
display: flex; | ||
align-items: center; | ||
background: fade-out($black, .2); | ||
border-radius: 3px; | ||
background: $bp-controls-background; | ||
border-radius: $bp-controls-radius-outer; | ||
|
||
&:empty { | ||
display: none; | ||
} | ||
|
||
& + & { | ||
margin-left: 6px; | ||
margin-left: $bp-controls-spacing; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/lib/viewers/controls/controls-bar/ControlsBarGroup.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@import 'src/lib/viewers/controls/styles'; | ||
|
||
.bp-ControlsBarGroup { | ||
display: flex; | ||
align-items: center; | ||
margin-left: $bp-controls-spacing; | ||
|
||
&:empty { | ||
display: none; | ||
} | ||
|
||
&:last-child { | ||
margin-right: $bp-controls-spacing; | ||
} | ||
} | ||
|
||
.bp-ControlsBarGroup--distinct { | ||
background-color: fade-out($bdl-gray-80, .2); | ||
border-radius: $bp-controls-radius-inner; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/lib/viewers/controls/controls-bar/ControlsBarGroup.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import './ControlsBarGroup.scss'; | ||
|
||
export type Props = React.HTMLAttributes<HTMLDivElement> & { | ||
isDistinct?: boolean; | ||
}; | ||
|
||
export default function ControlsBarGroup({ children, className, isDistinct }: Props): JSX.Element { | ||
return ( | ||
<div className={classNames('bp-ControlsBarGroup', { 'bp-ControlsBarGroup--distinct': isDistinct }, className)}> | ||
{children} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default } from './ControlsBar'; | ||
export { default as ControlsBarGroup } from './ControlsBarGroup'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import '../styles'; | ||
|
||
.bp-FindBarToggle { | ||
@include bp-ControlButton; | ||
@include bp-Control; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@import 'src/lib/viewers/controls/styles'; | ||
|
||
.bp-FullscreenToggle { | ||
@include bp-ControlButton; | ||
@include bp-Control; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.