-
Notifications
You must be signed in to change notification settings - Fork 13.3k
feat(datetime, datetime-button, picker-column, picker-column-option): improve styling flexibility by removing default color prop #31261
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
Changes from all commits
0b92301
69e5875
d5a7aae
9eaee49
a48adf2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,7 +181,7 @@ export class Datetime implements ComponentInterface { | |
| * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. | ||
| * For more information on colors, see [theming](/docs/theming/basics). | ||
| */ | ||
| @Prop() color?: Color = 'primary'; | ||
| @Prop() color?: Color; | ||
|
|
||
| /** | ||
| * The name of the control, which is submitted with the form data. | ||
|
|
@@ -1813,6 +1813,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {items.map((item) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The month/year picker was displaying selected values in the datetime's color (for example, red for |
||
| part={item.value === todayString ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART} | ||
| key={item.value} | ||
| disabled={item.disabled} | ||
|
|
@@ -1931,6 +1932,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {days.map((day) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
| part={day.value === pickerColumnValue ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART} | ||
| key={day.value} | ||
| disabled={day.disabled} | ||
|
|
@@ -1979,6 +1981,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {months.map((month) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
| part={month.value === workingParts.month ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART} | ||
| key={month.value} | ||
| disabled={month.disabled} | ||
|
|
@@ -2026,6 +2029,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {years.map((year) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
| part={year.value === workingParts.year ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART} | ||
| key={year.value} | ||
| disabled={year.disabled} | ||
|
|
@@ -2101,6 +2105,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {hoursData.map((hour) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
| part={hour.value === activePart.hour ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART} | ||
| key={hour.value} | ||
| disabled={hour.disabled} | ||
|
|
@@ -2142,6 +2147,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {minutesData.map((minute) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
| part={minute.value === activePart.minute ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART} | ||
| key={minute.value} | ||
| disabled={minute.disabled} | ||
|
|
@@ -2190,6 +2196,7 @@ export class Datetime implements ComponentInterface { | |
| > | ||
| {dayPeriodData.map((dayPeriod) => ( | ||
| <ion-picker-column-option | ||
| color={this.color} | ||
| part={ | ||
| dayPeriod.value === activePart.ampm ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any breaking changes associated with this, like CSS that may start overriding where it previously wasn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of any. Devs shouldn't be able to tell the difference with these changes even if they are customizing the primary variables themselves.