Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/cortex/CortexGitHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export const CortexGitHistory: Component<CortexGitHistoryProps> = (props) => {
placeholder="Filter commits..."
size="sm"
leftIcon="search"
ariaLabel="Filter commits"
type="search"
/>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/components/cortex/primitives/CortexIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const CORTEX_ICON_SIZES = {

export type CortexIconSize = keyof typeof CORTEX_ICON_SIZES | number;

export interface CortexIconProps {
export interface CortexIconProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
name: string;
size?: CortexIconSize;
color?: string;
Expand Down Expand Up @@ -203,7 +203,7 @@ const ICON_NAME_MAP: Record<string, string> = {
};

export const CortexIcon: Component<CortexIconProps> = (props) => {
const [local] = splitProps(props, [
const [local, others] = splitProps(props, [
"name",
"size",
"color",
Expand Down Expand Up @@ -233,6 +233,7 @@ export const CortexIcon: Component<CortexIconProps> = (props) => {

return (
<Icon
{...others}
name={getIconName()}
size={getSize()}
color={local.color}
Expand Down
9 changes: 8 additions & 1 deletion src/components/cortex/primitives/CortexInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface CortexInputProps {
autoFocus?: boolean;
multiline?: boolean;
rows?: number;
ariaLabel?: string;
}

const SIZE_SPECS = {
Expand All @@ -43,7 +44,7 @@ export const CortexInput: Component<CortexInputProps> = (props) => {
const [local] = splitProps(props, [
"value", "placeholder", "onChange", "onSubmit", "onFocus", "onBlur",
"disabled", "error", "size", "leftIcon", "rightIcon", "onRightIconClick",
"class", "style", "type", "autoFocus", "multiline", "rows",
"class", "style", "type", "autoFocus", "multiline", "rows", "ariaLabel",
]);

const [isFocused, setIsFocused] = createSignal(false);
Expand Down Expand Up @@ -130,6 +131,7 @@ export const CortexInput: Component<CortexInputProps> = (props) => {
name={local.leftIcon!}
size={specs().iconSize}
style={iconStyle(false)}
aria-hidden="true"
/>
</Show>

Expand All @@ -141,6 +143,8 @@ export const CortexInput: Component<CortexInputProps> = (props) => {
autofocus={local.autoFocus}
rows={local.rows || 3}
style={inputStyle()}
aria-label={local.ariaLabel}
aria-label={local.ariaLabel}
onInput={handleInput}
onFocus={handleFocus}
onBlur={handleBlur}
Expand All @@ -154,6 +158,8 @@ export const CortexInput: Component<CortexInputProps> = (props) => {
disabled={local.disabled}
autofocus={local.autoFocus}
style={inputStyle()}
aria-label={local.ariaLabel}
aria-label={local.ariaLabel}
onInput={handleInput}
onFocus={handleFocus}
onBlur={handleBlur}
Expand All @@ -166,6 +172,7 @@ export const CortexInput: Component<CortexInputProps> = (props) => {
name={local.rightIcon!}
size={specs().iconSize}
style={iconStyle(!!local.onRightIconClick)}
aria-hidden="true"
onClick={local.onRightIconClick}
/>
</Show>
Expand Down