Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions fasthtml/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def transformd(translate=None, scale=None, rotate=None, skewX=None, skewY=None,

# %% ../nbs/api/05_svg.ipynb
@delegates(ft_svg)
def Line(x1, y1, x2=0, y2=0, stroke='black', w=None, stroke_width=1, **kwargs):
def Line(x1, y1, x2=0, y2=0, stroke=None, w=None, stroke_width=None, **kwargs):
"A standard SVG `line` element"
if w: stroke_width=w
return ft_svg('line', x1=x1, y1=y1, x2=x2, y2=y2, stroke=stroke, stroke_width=stroke_width, **kwargs)
if w: stroke_width = w
return ft_hx('line', x1=x1, y1=y1, x2=x2, y2=y2, stroke=stroke, stroke_width=stroke_width, **kwargs)

# %% ../nbs/api/05_svg.ipynb
@delegates(ft_svg)
Expand Down
Loading