Skip to content

Commit

Permalink
fix(clipboard): disabled cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
aesteves60 authored and dpellier committed Aug 3, 2023
1 parent 75f2762 commit fb65c8a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/stencil/components/clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"test:e2e:ci:screenshot:update": "stencil test --config stencil.config.ts --e2e --ci --screenshot --update-screenshot --passWithNoTests"
},
"dependencies": {
"@ovhcloud/ods-component-icon": "^15.0.1",
"@ovhcloud/ods-stencil-component": "^15.0.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@
--ods-input-cursor: pointer;
--ods-input-icon-cursor: pointer;
}
}
}

:host([disabled]) {
cursor: not-allowed;
osds-input {
cursor: not-allowed;
--ods-input-cursor: not-allowed;
--ods-input-icon-cursor: not-allowed;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
odsClipboardDefaultAttributes,
OdsClipboardEvents,
OdsClipboardMethods,
OdsIconName,
OdsInputType,
} from '@ovhcloud/ods-core';
import { OdsStencilEvents, OdsStencilMethods } from '@ovhcloud/ods-stencil/libraries/stencil-core';
import { OdsThemeColorIntent } from '@ovhcloud/ods-theming';
import { ODS_ICON_NAME } from '@ovhcloud/ods-component-icon';

@Component({
tag: 'osds-clipboard',
Expand Down Expand Up @@ -58,7 +58,7 @@ export class OsdsClipboard implements OdsClipboard<OdsStencilMethods<OdsClipboar
color={ OdsThemeColorIntent.primary }
disabled={ this.disabled }
flex={ this.flex }
icon={ OdsIconName.COPY }
icon={ ODS_ICON_NAME.COPY }
type={ OdsInputType.text }
value={ this.value }
onClick={ () => this.handlerClick() }
Expand Down
1 change: 1 addition & 0 deletions packages/stencil/components/clipboard/src/global.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import './global';
import { OdsLogger } from '@ovhcloud/ods-core';

import '@ovhcloud/ods-stencil/components/input';
import '@ovhcloud/ods-component-icon';

const logger = new OdsLogger('global-dev');
logger.log('init');
Expand Down
1 change: 1 addition & 0 deletions packages/stencil/components/clipboard/src/global.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './global';

import '@ovhcloud/ods-stencil/components/input';
import '@ovhcloud/ods-component-icon';
4 changes: 2 additions & 2 deletions packages/stencil/components/clipboard/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export const config: Config = getStencilConfig({
reactOutput: {
componentCorePackage: '@ovhcloud/ods-stencil/components/clipboard',
// exclude peer dependencies that corresponds to www usage
excludeComponents: ['osds-input']
excludeComponents: ['osds-input', 'osds-icon']
},
vueOutput: {
componentCorePackage: '@ovhcloud/ods-stencil/components/clipboard',
excludeComponents: ['osds-input']
excludeComponents: ['osds-input', 'osds-icon']
},
dev: {
globalScript: 'src/global.dev.ts',
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6142,6 +6142,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@ovhcloud/ods-stencil-clipboard@workspace:packages/stencil/components/clipboard"
dependencies:
"@ovhcloud/ods-component-icon": ^15.0.1
"@ovhcloud/ods-stencil-component": ^15.0.1
"@ovhcloud/ods-stencil-component-dev": ^15.0.1
languageName: unknown
Expand Down

0 comments on commit fb65c8a

Please sign in to comment.