Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Renamed text alternative form button classes. Added save and cancel b…
Browse files Browse the repository at this point in the history
…uttons to the manual test.
  • Loading branch information
oleq committed Mar 15, 2018
1 parent c36fd9b commit 8b5a340
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion tests/manual/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import LabeledInputView from '@ckeditor/ckeditor5-ui/src/labeledinput/labeledinp

import boldIcon from '@ckeditor/ckeditor5-basic-styles/theme/icons/bold.svg';
import italicIcon from '@ckeditor/ckeditor5-basic-styles/theme/icons/italic.svg';
import checkIcon from '@ckeditor/ckeditor5-core/theme/icons/check.svg';
import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg';

import SplitButtonView from '@ckeditor/ckeditor5-ui/src/dropdown/button/splitbuttonview';

class TextView extends View {
Expand Down Expand Up @@ -114,9 +117,11 @@ function renderButton() {
const actionButton = button( { label: 'Action button' } );
const roundedButton = button( { label: 'Rounded corners' } );
const boldButton = button( { label: 'Bold text' } );
const saveButton = button( { label: 'Save', withText: false, icon: checkIcon } );
const cancelButton = button( { label: 'Cancel', withText: false, icon: cancelIcon } );

ui.buttonTypes.add( toolbar( [
actionButton, roundedButton, boldButton
actionButton, roundedButton, boldButton, saveButton, cancelButton
] ) );

// TODO: It requires model interface.
Expand All @@ -128,6 +133,9 @@ function renderButton() {
// TODO: It requires model interface.
boldButton.element.classList.add( 'ck-button-bold' );

saveButton.element.classList.add( 'ck-button-save' );
cancelButton.element.classList.add( 'ck-button-cancel' );

// --- Icon ------------------------------------------------------------

ui.buttonIcon.add( toolbar( [
Expand Down
4 changes: 2 additions & 2 deletions theme/ckeditor5-ui/components/button/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ a.ck-button {
@mixin ck-button-colors --ck-color-button-on;
}

&.ck-button_save {
&.ck-button-save {
color: var(--ck-color-button-save);
}

&.ck-button_cancel {
&.ck-button-cancel {
color: var(--ck-color-button-cancel);
}

Expand Down

0 comments on commit 8b5a340

Please sign in to comment.