Fix TS errors in ui/features/calendar
Closes CFA-53 flag=none Another stop on the way to zero tsc errors in the codebase. Test plan: * tsc no longer generates errors in this bundle * build passes Change-Id: I77b762c6bd40a34ed2dc6fa37e5da752bc6e5173 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/347027 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com> QA-Review: Charley Kline <ckline@instructure.com> Product-Review: Charley Kline <ckline@instructure.com>
This commit is contained in:
parent
1ccdfe9c0a
commit
5bbea7e67f
|
@ -80,7 +80,7 @@ const RenderViewsSelector = ({
|
|||
role="tab"
|
||||
aria-selected="false"
|
||||
aria-controls="calendar-app"
|
||||
tabIndex="-1"
|
||||
tabIndex={-1}
|
||||
>
|
||||
{I18n.t('Week')}
|
||||
</button>
|
||||
|
@ -91,7 +91,7 @@ const RenderViewsSelector = ({
|
|||
role="tab"
|
||||
aria-selected="false"
|
||||
aria-controls="calendar-app"
|
||||
tabIndex="-1"
|
||||
tabIndex={-1}
|
||||
>
|
||||
{I18n.t('Month')}
|
||||
</button>
|
||||
|
@ -102,7 +102,7 @@ const RenderViewsSelector = ({
|
|||
role="tab"
|
||||
aria-selected="false"
|
||||
aria-controls="calendar-app"
|
||||
tabIndex="-1"
|
||||
tabIndex={-1}
|
||||
>
|
||||
{I18n.t('Agenda')}
|
||||
</button>
|
||||
|
@ -112,7 +112,7 @@ const RenderViewsSelector = ({
|
|||
<span style={{display: size === 'large' ? 'none' : 'block'}}>
|
||||
<SimpleSelect
|
||||
renderLabel=""
|
||||
onChange={(e, data) => onChangeSelectViewMode(data.value)}
|
||||
onChange={(e, data) => onChangeSelectViewMode(String(data.value))}
|
||||
value={view}
|
||||
>
|
||||
<SimpleSelect.Option id="s_week" value="week">
|
||||
|
@ -226,7 +226,9 @@ const CalendarHeaderComponent = (headerProps: CalendarHeaderComponentProps) => {
|
|||
small: {maxWidth: '607px'},
|
||||
large: {minWidth: '608px'},
|
||||
}}
|
||||
render={(_, matches) => <RenderContent headerProps={headerProps} size={matches[0]} />}
|
||||
render={(_, matches) => (
|
||||
<RenderContent headerProps={headerProps} size={matches ? matches[0] : ''} />
|
||||
)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ const I18n = useI18nScope('calendar.header')
|
|||
const LegacyBackboneDateComponent = ({size}: {size: string}) => {
|
||||
return (
|
||||
<>
|
||||
<h2 className="navigation_title" tabIndex="-1">
|
||||
<h2 className="navigation_title" tabIndex={-1}>
|
||||
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
|
||||
<span role="button" className="navigation_title_text blue" tabIndex="0" />
|
||||
<span role="button" className="navigation_title_text blue" tabIndex={0} />
|
||||
</h2>
|
||||
<span className="date_field_wrapper">
|
||||
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
|
||||
|
@ -98,7 +98,7 @@ const ContentSmallSize = (props: CalendarNavigatorComponentProps) => {
|
|||
</Flex.Item>
|
||||
</span>
|
||||
|
||||
<Flex.Item overflowY="visible" shouldGrow={true} alignItems="center" textAlign="center">
|
||||
<Flex.Item overflowY="visible" shouldGrow={true} align="center" textAlign="center">
|
||||
<LegacyBackboneDateComponent size="small" />
|
||||
</Flex.Item>
|
||||
|
||||
|
|
Loading…
Reference in New Issue