Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LOOM-1280][BpkDatePicker] Remove useless styling #3388

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 0 additions & 28 deletions packages/bpk-component-datepicker/src/BpkDatepicker.module.scss

This file was deleted.

11 changes: 1 addition & 10 deletions packages/bpk-component-datepicker/src/BpkDatepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,13 @@ import BpkInput, { withOpenEvents } from '../../bpk-component-input';
import BpkModal from '../../bpk-component-modal';
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
import BpkPopover from '../../bpk-component-popover';
import { cssModules } from '../../bpk-react-utils';

import type {
DaysOfWeek,
ReactComponent,
SelectionConfiguration,
} from '../../bpk-component-calendar';

import STYLES from './BpkDatepicker.module.scss';

const getClassName = cssModules(STYLES);

const Input = withOpenEvents(BpkInput);

const DefaultCalendar = withCalendarState(
Expand Down Expand Up @@ -318,10 +313,7 @@ class BpkDatepicker extends Component<Props, State> {
delete rest.isOpen;

const input = inputComponent || (
<div
className={getClassName('bpk-datepicker__input')}
ref={this.inputRef}
>
<div ref={this.inputRef} >
<Input
id={id}
name={`${id}_input`}
Expand All @@ -340,7 +332,6 @@ class BpkDatepicker extends Component<Props, State> {

const calendarProps = {
id: `${id}-calendar`,
className: getClassName('bpk-datepicker__calendar'),
changeMonthLabel,
dateModifiers,
daysOfWeek,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

exports[`BpkDatepicker "readOnly" can be overriden in "inputProps" 1`] = `
<DocumentFragment>
<div
class="bpk-datepicker__input"
>
<div>
<input
aria-atomic="true"
aria-invalid="false"
Expand All @@ -23,9 +21,7 @@ exports[`BpkDatepicker "readOnly" can be overriden in "inputProps" 1`] = `

exports[`BpkDatepicker should render correctly 1`] = `
<DocumentFragment>
<div
class="bpk-datepicker__input"
>
<div>
<input
aria-atomic="true"
aria-invalid="false"
Expand All @@ -44,9 +40,7 @@ exports[`BpkDatepicker should render correctly 1`] = `

exports[`BpkDatepicker should render correctly when not valid 1`] = `
<DocumentFragment>
<div
class="bpk-datepicker__input"
>
<div>
<input
aria-atomic="true"
aria-invalid="true"
Expand All @@ -65,9 +59,7 @@ exports[`BpkDatepicker should render correctly when not valid 1`] = `

exports[`BpkDatepicker should render range correctly 1`] = `
<DocumentFragment>
<div
class="bpk-datepicker__input"
>
<div>
<input
aria-atomic="true"
aria-invalid="false"
Expand Down