Skip to content

Commit

Permalink
Add 'divided block' style
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Oct 7, 2020
1 parent 518c84f commit 65945e5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/StyleWrapper/StyleWrapperView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default (props) => {
return (
<div
className={cx(
'align',
'block align',
style?.cssClass,
{
center: !Boolean(align),
Expand Down
10 changes: 10 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ export const installDemoStyles = (config) => {
),
// TODO: support also editComponent ?
},
{
id: 'borderBlock',
title: 'Border',
cssClass: 'border-block',
},
{
id: 'dividedBlock',
title: 'Divided',
cssClass: 'divided-block',
},
];

return config;
Expand Down
13 changes: 13 additions & 0 deletions src/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,16 @@
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2);
border-radius: 4px;
}

.border-block {
border: 1px solid rgba(0,0,0, 0.2);
padding: 0.7rem;
p {margin-bottom: 0!important;}
}

.divided-block {
border-top: 1px solid rgba(0,0,0, 0.2);
border-bottom: 1px solid rgba(0,0,0, 0.2);
padding: 0.3rem;
p {margin-bottom: 0!important;}
}

0 comments on commit 65945e5

Please sign in to comment.