Skip to content

Commit

Permalink
Merge branch 'main' into fix-1438
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Dec 2, 2023
2 parents 965aa4c + ed0ef62 commit facb0c8
Show file tree
Hide file tree
Showing 11 changed files with 1,450 additions and 1,005 deletions.
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
header:
# default is 80, need to make it slightly longer for a long shebang
license-location-threshold: 100
license:
spdx-id: MPL-2.0
content: |
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Copyright Oxide Computer Company
*/

module.exports = {
export default {
// note: it seems like tailwind has to be last for it to work
plugins: ['@ianvs/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'],
printWidth: 92,
Expand Down
7 changes: 7 additions & 0 deletions libs/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export const api = new Api({
host: process.env.NODE_ENV === 'test' ? 'http://testhost' : '',
})

// add the API client to window for use from the browser JS console. requests
// will use the session cookie, same as normal API calls
if (typeof window !== 'undefined') {
// @ts-expect-error
window.oxide = api.methods
}

export type ApiMethods = typeof api.methods

export const useApiQuery = getUseApiQuery(api.methods)
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/lib/date-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function DateRangePicker(props: DateRangePickerProps) {
: 'border-default ring-accent-secondary'
)}
>
<div className={cn('relative flex w-[16rem] items-center px-3 text-sans-md')}>
<div className={cn('relative flex w-[17rem] items-center px-3 text-sans-md')}>
{label}
{state.isInvalid && (
<div className="absolute bottom-0 right-2 top-0 flex items-center text-error">
Expand Down
Loading

0 comments on commit facb0c8

Please sign in to comment.